package com.quick.tim.mobileserviceprovider.entity;
// Generated 5 Jun, 2013 6:08:00 PM by Hibernate Tools 3.2.1.GA


import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ExamStudentResponse generated by hbm2java
 */
@Entity
@Table(name="exam_student_response", schema="public"
)
public class ExamStudentResponse  implements java.io.Serializable {


     private ExamStudentResponseId id;
     private ExamEntry examEntry;
     private ExamQuestionsAnswers examQuestionsAnswers;
     private UserMaster userMaster;
     private String objAns;
     private String descriptiveAns;
     private int obtMarksForObjQuestion;
     private int obtMarksForDescQuestion;

    public ExamStudentResponse() {
    }

	
    public ExamStudentResponse(ExamStudentResponseId id, ExamEntry examEntry, ExamQuestionsAnswers examQuestionsAnswers, UserMaster userMaster) {
        this.id = id;
        this.examEntry = examEntry;
        this.examQuestionsAnswers = examQuestionsAnswers;
        this.userMaster = userMaster;
    }
    public ExamStudentResponse(ExamStudentResponseId id, ExamEntry examEntry, ExamQuestionsAnswers examQuestionsAnswers, UserMaster userMaster, String objAns, String descriptiveAns, int obtMarksForObjQuestion, int obtMarksForDescQuestion) {
       this.id = id;
       this.examEntry = examEntry;
       this.examQuestionsAnswers = examQuestionsAnswers;
       this.userMaster = userMaster;
       this.objAns = objAns;
       this.descriptiveAns = descriptiveAns;
       this.obtMarksForObjQuestion = obtMarksForObjQuestion;
       this.obtMarksForDescQuestion = obtMarksForDescQuestion;
    }
   
     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="exId", column=@Column(name="ex_id", nullable=false) ), 
        @AttributeOverride(name="username", column=@Column(name="username", nullable=false, length=250) ), 
        @AttributeOverride(name="questionId", column=@Column(name="question_id", nullable=false) ) } )
    public ExamStudentResponseId getId() {
        return this.id;
    }
    
    public void setId(ExamStudentResponseId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ex_id", nullable=false, insertable=false, updatable=false)
    public ExamEntry getExamEntry() {
        return this.examEntry;
    }
    
    public void setExamEntry(ExamEntry examEntry) {
        this.examEntry = examEntry;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="question_id", nullable=false, insertable=false, updatable=false)
    public ExamQuestionsAnswers getExamQuestionsAnswers() {
        return this.examQuestionsAnswers;
    }
    
    public void setExamQuestionsAnswers(ExamQuestionsAnswers examQuestionsAnswers) {
        this.examQuestionsAnswers = examQuestionsAnswers;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="username", nullable=false, insertable=false, updatable=false)
    public UserMaster getUserMaster() {
        return this.userMaster;
    }
    
    public void setUserMaster(UserMaster userMaster) {
        this.userMaster = userMaster;
    }
    
    @Column(name="obj_ans", length=32)
    public String getObjAns() {
        return this.objAns;
    }
    
    public void setObjAns(String objAns) {
        this.objAns = objAns;
    }
    
    @Column(name="descriptive_ans", length=1000)
    public String getDescriptiveAns() {
        return this.descriptiveAns;
    }
    
    public void setDescriptiveAns(String descriptiveAns) {
        this.descriptiveAns = descriptiveAns;
    }
    
    @Column(name="obt_marks_for_obj_question")
    public int getObtMarksForObjQuestion() {
        return this.obtMarksForObjQuestion;
    }
    
    public void setObtMarksForObjQuestion(int obtMarksForObjQuestion) {
        this.obtMarksForObjQuestion = obtMarksForObjQuestion;
    }
    
    @Column(name="obt_marks_for_desc_question")
    public int getObtMarksForDescQuestion() {
        return this.obtMarksForDescQuestion;
    }
    
    public void setObtMarksForDescQuestion(int obtMarksForDescQuestion) {
        this.obtMarksForDescQuestion = obtMarksForDescQuestion;
    }




}


